package com.ridbor001.demo.bean;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

public class RDBEvaluation implements Serializable {
    private String evalId;        // 评教记录ID
    private String studentId;     // 学生ID（关联用户系统）
    private String courseId;      // 关联课程ID
    private LocalDateTime evalTime; // 评教时间

    // 评教内容
    private List<RDBEvaluationItem> items = new ArrayList<>();

    public RDBEvaluation() {
    }

    public RDBEvaluation(String evalId, String studentId, String courseId, LocalDateTime evalTime, List<RDBEvaluationItem> items) {
        this.evalId = evalId;
        this.studentId = studentId;
        this.courseId = courseId;
        this.evalTime = evalTime;
        this.items = items;
    }
    public RDBEvaluation(String evalId, String studentId, String courseId, LocalDateTime evalTime) {
        this.evalId = evalId;
        this.studentId = studentId;
        this.courseId = courseId;
        this.evalTime = evalTime;
    }
    public void addItem(String dimension, int score, String comment) {
        this.items.add(new RDBEvaluationItem(dimension, score, comment));
    }
    public String getEvalId() {
        return evalId;
    }

    public void setEvalId(String evalId) {
        this.evalId = evalId;
    }

    public String getStudentId() {
        return studentId;
    }

    public void setStudentId(String studentId) {
        this.studentId = studentId;
    }

    public String getCourseId() {
        return courseId;
    }

    public void setCourseId(String courseId) {
        this.courseId = courseId;
    }

    public LocalDateTime getEvalTime() {
        return evalTime;
    }

    public void setEvalTime(LocalDateTime evalTime) {
        this.evalTime = evalTime;
    }

    public void setItems(List<RDBEvaluationItem> items) {
        this.items = items;
    }
    public List<RDBEvaluationItem> getItems() {
        return items;
    }
}